<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function zuo(a) {
        var aLen=a.length;
        var b=[];
        for(var i=0;i<aLen;i++){
            var ran=Math.floor(Math.random()*(i+1));
            if(ran!=i){
                b[i]=b[ran];
            }
                b[ran]=a[i];
        }
        return b;
    }
   var j=[];
    var a=[11,22,333,44,5,66,77,8,9,0,6,7,88,99,100];
    for(var i=0;i<3000;i++){
        j.push(zuo(a)[5]);
    }
    console.log(j);
    ////////////////测试
    var hash={};
    for(var i=0,iLen=j.length;i<iLen;i++){
        hash[j[i]]?hash[j[i]]++:(hash[j[i]]=1);
    }
    console.log(hash);
</script>
</body>
</html>